package org.ocelot.tunes4j.utils;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.channels.FileChannel;

public class FileUtils {
	
	public static void copy(File s, File t) throws IOException {
    	//long start = System.currentTimeMillis();
        FileChannel in = (new FileInputStream(s)).getChannel();
        FileChannel out = (new FileOutputStream(t)).getChannel();
        in.transferTo(0, s.length(), out);
        in.close();
        out.close();
  		//long end = System.currentTimeMillis();
  		//long elapsedTime = end - start;
  		//System.out.println("Copy process using: 'NioCopier', Finished In: " + elapsedTime/ 1000f + " seconds:");
      }
	
}
